<template>
  <div class="Edit">
    <div class="top">
      <el-button type="primary">查询</el-button>
      <el-button>取消</el-button>
    </div>
    <div class="main">
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="产品名称:">
          <el-input v-model="$data.name" placeholder="输入产品名字" />
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="产品状态:">
          <el-input v-model="$data.name" />
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="成本价:">
          <el-input v-model="$data.name" />
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="定价:">
          <el-input v-model="$data.name" />
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="优惠:">
          <el-input v-model="$data.name" />
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="限购:">
          <el-input v-model="$data.name" />
        </el-form-item>
      </el-form>
      <!-- 时间 -->
      <el-form :model="form" label-width="100px" style="width: 250px">
        <el-form-item label="开售时间:">
          <div class="block">
            <el-date-picker
              v-model="value1"
              type="date"
              placeholder="选择开售时间"
              :default-value="new Date(2010, 9, 1)"
            />
          </div>
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="200px" style="width: 250px">
        <el-form-item label="下架时间:">
          <div class="block">
            <el-date-picker
              v-model="value2"
              type="date"
              placeholder="选择下架时间"
              :default-value="new Date(2010, 9, 1)"
            />
          </div>
        </el-form-item>
      </el-form>
    </div>
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="类型:">
        <el-select v-model="value" class="m-2">
          <el-option
            v-for="item in $options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
    </el-form>
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="单位:">
        <el-select v-model="value" class="m-2">
          <el-option
            v-for="item in $options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
    </el-form>
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="品级:">
        <el-select v-model="value" class="m-2">
          <el-option
            v-for="item in $options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
    </el-form>
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="产地:">
        <el-input v-model="$data.name" placeholder="输入产地" />
      </el-form-item>
    </el-form>
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="品牌:">
        <el-input v-model="$data.name" placeholder="输入品牌" />
      </el-form-item>
    </el-form>
    <br />
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="详情:">
        <el-input v-model="$data.name" />
      </el-form-item>
    </el-form>
    <br />
    <el-form :model="form" label-width="100px" style="width: 250px">
      <el-form-item label="banner:">
        <el-input v-model="$data.name" />
      </el-form-item>
    </el-form>
  </div>
  <a class="href" href="">添加新成分数据</a>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="state" label="成分名字" width="180" align="center" />
    <el-table-column prop="name" label="数量" width="180" align="center" />
    <el-table-column prop="type" label="价格" width="180" align="center" />
    <el-table-column prop="level" label="厂商" width="180" align="center" />
    <el-table-column prop="brand" label="类型" width="180" align="center" />
    <el-table-column prop="address" label="单位" width="180" align="center" />
    <el-table-column prop="price" label="产地" width="180" align="center" />
    <el-table-column prop="types" label="品牌" width="180" align="center" />
    <el-table-column prop="operation" label="操作" align="center">
    </el-table-column>
  </el-table>
  <el-input
    v-model="textarea2"
    class="note"
    type="textarea"
    placeholder="备注"
  />
</template>

<script>
export default {
  name: "Edit",
  data() {
    return {
      name: "",
      value1: "",
      value2: "",
      tableData: [
        {
          state: "销售中",
          name: "abcd",
          type: "CY",
          level: "AAA",
          brand: "拼多多",
          address: "成都",
          price: "80.00",
          types: "尽快",
          operation: "成都",
        },
      ],
      textarea2: "",
    };
  },
};
</script>

<style lang="less" scoped>
.top {
  float: right;
  margin-right: 20px;
  margin-bottom: 10px;
}
.el-form {
  display: inline-block;
  margin-top: 50px;
}
.href {
  display: block;
  margin-left: 34px;
  margin-bottom: 10px;
  color: rgb(27, 69, 255);
  text-decoration: none;
}
.note {
  margin-top: 50px;
  margin-left: 70px;
  width: 1500px;
}
</style>
